package com.xmall.order.define.dto;

import com.xmall.order.define.dict.RefundStatusEnum;
import com.xmall.order.define.dict.RefundTypeEnum;
import com.xmall.order.entity.OrderRefund;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * <p>
 * 订单退款退货
 * </p>
 *
 * @author xmall
 * @since 2023-11-26
 */
@Getter
@Setter
public class OrderRefundDto extends OrderRefund implements Serializable {

    /**
     * 退款退货状态（0待审核 1同意 2拒绝 3待收货 4已收货 5已退款）
     */
    private String refundStatusName;

    /**
     * 退款类型（0仅退款 1退款退货 2换货）
     */
    private String refundTypeName;

    public String getRefundTypeName() {
        return RefundTypeEnum.getNameByType(this.getRefundType());
    }

    public String getRefundStatusName() {
        return RefundStatusEnum.getNameByStatus(this.getRefundStatus());
    }
}
